<?php
	class BD
	{
		private $usuario =  'usuario';
		private $senha = 'senha123';
		private $host = 'localhost';
		private $base = 'usuarios';
		
		public function __construct() {
			mysql_connect($host,$user,$password);
			@mysql_select_db($base) or die( "Erro!");
		}
      
     public function query($q) {
       $result = mysql_query($q);
       if (!$result) {
         die('ERRO!');
       }
       
       return $result;
     }
     
     public function queryArray($q) {
       $result = mysql_query($q);
       if (!$result) {
         die('ERRO!');
       }
       
       return mysql_fetch_array($result);
     }
     
	}
?>